package com.xx.springboot.designPattern.FactoryMode;/**
 * Created by xiaoxiunique on 2018-11-15.
 */

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * TODO:
 * </p>
 *
 * @author hcg
 * @date 2018-11-15 15:34
 * @className Pizza
 */
public abstract class Pizza {

    String name;
    String dough;
    String sauce;

    List toppings = new ArrayList();

    /**
     * 准备
     */
    public void prepare() {
        System.out.println("preparing" + name);
        toppings.forEach(System.out::print);
    }


    /**
     * 烘烤
     */
    public void bake() {
        System.out.println("bake");
    }

    /**
     * 切片
     */
    public void cut() {
        System.out.println("cut");
    }

    /**
     * 包装
     */
    public void box() {
        System.out.println("box");
    }

    public String getName() {
        return name;
    }
}
